package com.chixigua.chaos.mapper;

import com.chixigua.chaos.config.security.auth.MyUserDetails;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface MyUserDetailsMapper {

    //根据userID查询用户信息
    MyUserDetails findByUserName(String userName);

    //根据userID查询用户角色列表
    List<String> findRoleByUserName( String userName);

    //根据用户角色查询用户权限
    List<String> findAuthorityByRoleCodes(@Param("roleCodes") List<String> roleCodes);

    //根据名字查询权限
    List<String> findUrlsByUserName(String userName);

}